#pragma once
#include "end.h"
class ADEnd : public End
{
public:
	ADEnd(int x, int y, int width, int height, char stroke[], int strokeWidth, char fill[]):
		End(x, y, width, height, stroke, strokeWidth, fill)
	{
	}

public:
	ADEnd(void);
	~ADEnd(void);

	void Fill(MyGraphics* g)
	{
		int smallDiameter = _height / 3;
		int largeDiameter = _height * 2 / 3;

		// To ellipse lon
		g->FillEllipse(_fill, _x + (_width - largeDiameter) / 2, _y + (_height - largeDiameter) / 2, 
							largeDiameter, largeDiameter);
	}

	void Draw(MyGraphics* g)
	{
		Fill(g);

		// Ve ellipse nho
		int smallDiameter = _height / 3;
		int largeDiameter = _height * 2 / 3;

		//g->FillEllipse(_stroke, _x + (_width - diameter) / 2, _y + diameter / 2, diameter, diameter);

		// Ve ellipse lon
		g->DrawEllipse(_stroke, _strokeWidth, _x + (_width - largeDiameter) / 2, _y + (_height - largeDiameter) / 2, 
							largeDiameter, largeDiameter);

		// To ellipse nho
		g->FillEllipse(_stroke, _x + (_width - smallDiameter) / 2, _y + (_height - smallDiameter) / 2, 
							smallDiameter, smallDiameter);
	}
};

